import { message } from 'ant-design-vue';
import 'ant-design-vue/es/message/style/css';
import useArticleModifier from "./article-modifier"
import useFindArticles from './find-article';
import { useRouter } from 'vue-router'; 

export default function useArticleApi(onSuccesed) {
  const router = useRouter();
  return {
    ...useFindArticles(),
    ...useArticleModifier(
      onSuccesed,
      (error) => {
        if(error)
          message.error(`出现错误：${error}`)
        else 
          message.error("出现错误")
      }
    )
  }
}